//
//  RequestBaseData.h
//  QinjinProject
//
//  Created by Michael on 14-9-13.
//  Copyright (c) 2014年 ___Michael___. All rights reserved.
//

#import <Foundation/Foundation.h>

enum
{
    LOADING_NOTSTART,
    LOADING_START,
    LOADING_SUCCESS,
    LOADING_FAILED,
};

typedef void (^SuccessBlock)(AFHTTPRequestOperation *operation, id responseObject);
typedef void (^FailBlock)(AFHTTPRequestOperation *operation, NSError *error);

@interface RequestBaseData : NSObject

@property(nonatomic,strong)NSString*                method;
@property(nonatomic,strong)NSString*                urlPath;
@property(nonatomic,strong)NSMutableDictionary*     parameters;
@property(nonatomic,strong)NSString*                strDataKey;

@property(nonatomic)int                             loadingStatus;
@property(nonatomic)BOOL                            showLoading;


-(void)getLoadData:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success
        failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure;

-(void)postLoadData:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success
           failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure;

-(void)parseData:(id)dataObj;

@end





